<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html ng-app>
<head>
<base href="<%=basePath%>" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>HelloWord</title>
<script src="js/Angular.js">
	//angular app
	var app = angular.module("ngApp", [], function() {
		console.log("ng-app : ngApp");
	});
	// angular controller
	app.controller("ngCtl", [ '$scope', function($scope) {
		console.log("ng-controller : ngCtl");
		$scope.myLabel = "text for label";
		$scope.myInput = "text for input";
		$scope.btnClicked = function() {
			console.log("Label is " + $scope.myLabel);
		}
	} ]);
</script>
</head>
<body ng-app="ngApp">
	<div ng-controller="ngCtl">
		<label ng-model="myLabel"></label> 
		<input type="text" ng-model="myInput" />
		<button ng-model="myButton" ng-click="btnClicked">测试</button>
	</div>
</body>
</html>